<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.div1{
				width: 100px;
				height: 100px;
				border: 1px solid red;
			}
			.div2{
				width: 100px;
				height: 100px;
				background: red;
				display: none;
			}
			.on{
				display: block;
			}
		</style>
	</head>
	<body>
		<div class="div1">
			
		</div>
		<div class="div2">
			
		</div>
	</body>
	<script type="text/javascript">
		var oDiv1 = document.querySelector(".div1")
		var oDiv2 = document.querySelector(".div2")
		oDiv1.onmouseenter = function(){
			oDiv2.classList.add('on')
		}
		oDiv1.onmouseleave = function(){
			oDiv2.classList.remove('on')
		}
	</script>
</html>
